
\chapter{Conclusion}
\label{c:conclusion}
        
        \section{Summary}
        \label{sec:summary}
        The work done in this thesis focused on building a scalable part image search engine. The main approach focused on adapting a text-based search engine (Lucene)
        for image retrieval. Clustering and spectral hashing methods are used as two alternatives for feature space partitioning, the performance of the search engine
        was evaluated to compare between the two methods.
        \\

        As for the clustering approach, \ac{HIKM} was used. This method is controlled by several parameters such as the codebook size. Experiments done in order to
        evaluate the quality of the results under different parameter settings. Experiments showed that the quality of the results increases with the increasing codebook size.
        Additionally, in the presence of a high percentage of noise data, increasing the codebook size helps greatly in decreasing the effect of noise and enhancing the 
        quality of retrieval results.
        \\

        Some optimizations were also applied to the Lucene scoring functions, in order to adapt the scoring parameters to image retrieval. These modifications 
        resulted in a big increase in the quality of the results, since the Lucene scores are the basis of the ranking of the retrieval results.
        \\

        Additionally, several variants of match refinement methods were evaluated, as a post-processing stage to enhance the retrieval results. The Hough Transform
        based method for math refinement and its modification described in section \ref{ss:evalmatref} had the highest enhancement effect on the retrieval results.
        It was also observed that increasing the codebook size has also a positive effect on reducing the number of false matches between query and target images.
        \\

        In terms of time, the total query time of the clustering/Lucene based search decreased greatly compared to \ac{DPS}. Additionally, the use of an inverted index
        and clustering the feature space enhanced the scalability of the system greatly and made it possible to perform queries in less than 1 sec. against an index of about $10^{5}$ images,
        built from a codebook trained on a total number of patches (local image features) of more than $60 \times 10^6$ patches. Querying such large scale datasets was 
        infeasible in the case of \ac{DPS}.
        \\
        
        
        Figure \ref{fig:summary} shows a summary of the different enhancements and optimizations done, and the corresponding increase in the \ac{MAP} obtained by the experiments
        done on the Holidays dataset.
        \begin{figure}[!htbp]
        \centering
                \includegraphics[width=11cm]{pics/summary.png}
                \caption{Summarizing the performance enhancements}
                The figure summarizes the effect of different enhancements on the overall performance of the search engine. The enhancements include 
                 \begin{inparaenum}[(i)] \item optimizing the Lucene scoring functions. \item applying the Hough tranform match refinement method. \item applying
                        the fanning effect removal modification to the refinement method.
                 \end{inparaenum}

                \label{fig:summary}
        \end{figure}
        \section{Outlook}
        For future work, it is suggested to investigate other methods for match refinement, which are capable of detecting more complex transformations (e.g. homographic transformation) between the matches of 
        the target and query images, hence providing a more accurate separation between true and false matches.
        \\
        
        Additionally, adapting such a scalable approach for object category detection is a possible direction for future research. This requires the use of labeled datasets of images.
        It was observed throughout the experimentation done on the Holidays dataset, that although some query results are considered irrelevant due to that they do not
        belong to the series of the query image, they still capture information which is relevant to the query, such as similar scene elements (e.g. trees, underwater scenes).
        \\
        
        Moreover, the approach adopted in this thesis can also be used to complement the scene-based image retrieval by transitive matching introduced by Ulges and Schulze \cite{Ulges2011}.
        This approach focuses on using matching parts from different images to infer a transitive match relation between a sequence of images. The approach presented in this
        thesis can be used as the backbone of such a transitive retrieval system.
        \\
        
        More investigation can also be done in optimizing the Lucene scoring functions, where some parameters of the Lucene scoring can be reverse engineered in order
        to adapt these parameters more to image matching. Optimizing Lucene scors as shown by the evaluation results had the greatest effect on the quality of the results.
        
        